home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / dos / dosextens.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  19KB  |  563 lines

  1. #ifndef DOS_DOSEXTENS_H
  2. #define DOS_DOSEXTENS_H 1
  3. /*
  4. ** dosextens.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/02/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for dosextens.h
  17. */
  18. #ifndef AssignListPtr
  19. #define AssignListPtr ADDRESS
  20. #endif
  21. #ifndef CliProcListPtr
  22. #define CliProcListPtr ADDRESS
  23. #endif
  24. #ifndef CommandLineInterfacePtr
  25. #define CommandLineInterfacePtr ADDRESS
  26. #endif
  27. #ifndef DevInfoPtr
  28. #define DevInfoPtr ADDRESS
  29. #endif
  30. #ifndef DevProcPtr
  31. #define DevProcPtr ADDRESS
  32. #endif
  33. #ifndef DeviceListPtr
  34. #define DeviceListPtr ADDRESS
  35. #endif
  36. #ifndef DosInfoPtr
  37. #define DosInfoPtr ADDRESS
  38. #endif
  39. #ifndef DosLibraryPtr
  40. #define DosLibraryPtr ADDRESS
  41. #endif
  42. #ifndef DosListPtr
  43. #define DosListPtr ADDRESS
  44. #endif
  45. #ifndef DosPacketPtr
  46. #define DosPacketPtr ADDRESS
  47. #endif
  48. #ifndef ErrorStringPtr
  49. #define ErrorStringPtr ADDRESS
  50. #endif
  51. #ifndef FileHandlePtr
  52. #define FileHandlePtr ADDRESS
  53. #endif
  54. #ifndef FileLockPtr
  55. #define FileLockPtr ADDRESS
  56. #endif
  57. #ifndef ProcessPtr
  58. #define ProcessPtr ADDRESS
  59. #endif
  60. #ifndef RootNodePtr
  61. #define RootNodePtr ADDRESS
  62. #endif
  63. #ifndef SegmentPtr
  64. #define SegmentPtr ADDRESS
  65. #endif
  66. #ifndef StandardPacketPtr
  67. #define StandardPacketPtr ADDRESS
  68. #endif
  69. #ifndef dol_assign_StructPtr
  70. #define dol_assign_StructPtr ADDRESS
  71. #endif
  72. #ifndef dol_handler_StructPtr
  73. #define dol_handler_StructPtr ADDRESS
  74. #endif
  75. #ifndef dol_volume_StructPtr
  76. #define dol_volume_StructPtr ADDRESS
  77. #endif
  78. /*
  79. ** End of StructPointer defines for dosextens.h
  80. */
  81.                  
  82. #ifndef EXEC_TASKS_H
  83. #include <exec/tasks.h>
  84. #endif
  85. #ifndef EXEC_PORTS_H
  86. #include <exec/ports.h>
  87. #endif
  88. #ifndef EXEC_LIBRARIES_H
  89. #include <exec/libraries.h>
  90. #endif
  91. #ifndef EXEC_SEMAPHORES_H
  92. #include <exec/semaphores.h>
  93. #endif
  94. #ifndef DEVICES_TIMER_H
  95. #include <devices/timer.h>
  96. #endif
  97.  
  98. #ifndef DOS_DOS_H
  99. #include <dos/dos.h>
  100. #endif
  101.  
  102.  
  103.  
  104. /* All DOS processes have this structure */
  105. /* Create and Device Proc returns pointer to the MsgPort in this structure */
  106. /* dev_proc = (STRUCT Process *) (DeviceProc(..) - sizeof(STRUCT Task))  */
  107.  
  108. STRUCT Process  
  109.     Task pr_Task 
  110.     MsgPort pr_MsgPort  /* This is ADDRESS address from DOS functions  */
  111.     SHORTINT    pr_Pad      /* Remaining variables on 4 byte boundaries */
  112.     ADDRESS    pr_SegList      /* Array of seg lists used by this process  */
  113.     LONGINT    pr_StackSize    /* Size of process stack in bytes       */
  114.     ADDRESS    pr_GlobVec      /* Global vector for this process (BCPL)    */
  115.     LONGINT    pr_TaskNum      /* CLI task number of zero if not a CLI     */
  116.     ADDRESS    pr_StackBase    /* Ptr to high memory end of process stack  */
  117.     LONGINT    pr_Result2      /* Value of secondary result from last call */
  118.     ADDRESS    pr_CurrentDir   /* Lock associated with current directory   */
  119.     ADDRESS    pr_CIS      /* Current CLI Input Stream         */
  120.     ADDRESS    pr_COS      /* Current CLI Output Stream            */
  121.     ADDRESS    pr_ConsoleTask  /* Console handler process for current window*/
  122.     ADDRESS    pr_FileSystemTask   /* File handler process for current drive   */
  123.     ADDRESS    pr_CLI      /* pointer to CommandLineInterface      */
  124.     ADDRESS    pr_ReturnAddr   /* pointer to previous stack frame      */
  125.     ADDRESS    pr_PktWait      /* Function to be called when awaiting msg  */
  126.     ADDRESS    pr_WindowPtr    /* Window for error printing            */
  127.  
  128.     /* following definitions are new with 2.0 */
  129.     ADDRESS    pr_HomeDir      /* Home directory of executing program      */
  130.     LONGINT    pr_Flags        /* flags telling dos about process      */
  131.     ADDRESS   pr_ExitCode    /* code TO CALL ON EXIT of program OR NULL  */
  132.     LONGINT    pr_ExitData     /* Passed as an argument to pr_ExitCode.    */
  133.     ADDRESS   pr_Arguments   /* Arguments passed to the process at start */
  134.     MinList pr_LocalVars  /* Local environment variables         */
  135.     LONGINT   pr_ShellPrivate     /* for the use of the current shell     */
  136.     ADDRESS    pr_CES      /* Error stream - if NULL,  use pr_COS       */
  137. END STRUCT   /* Process */
  138.  
  139. /*
  140.  * Flags for pr_Flags
  141.  */
  142. #define PRB_FREESEGLIST     0
  143. #define PRF_FREESEGLIST     1
  144. #define PRB_FREECURRDIR     1
  145. #define PRF_FREECURRDIR     2
  146. #define PRB_FREECLI     2
  147. #define PRF_FREECLI     4
  148. #define PRB_CLOSEINPUT      3
  149. #define PRF_CLOSEINPUT      8
  150. #define PRB_CLOSEOUTPUT     4
  151. #define PRF_CLOSEOUTPUT     16
  152. #define PRB_FREEARGS        5
  153. #define PRF_FREEARGS        32
  154.  
  155. /* The LONGINT SHORTINT address (ADDRESS) of this structure is returned by
  156.  * Open() and other routines that return a file.  You need only worry
  157.  * about this STRUCT to do async io's via PutMsg() instead of
  158.  * standard file system calls */
  159.  
  160. STRUCT FileHandle  
  161.    MessagePtr  fh_Link   /* EXEC message          */
  162.    MsgPortPtr  fh_Port   /* Reply port for the packet */
  163.    MsgPortPtr  fh_Type   /* Port to do PutMsg() to
  164.                   * Address is negative if a plain file */
  165.    LONGINT fh_Buf 
  166.    LONGINT fh_Pos 
  167.    LONGINT fh_End 
  168.    LONGINT fh_Funcs 
  169. #define fh_Func1 fh_Funcs
  170.    LONGINT fh_Func2 
  171.    LONGINT fh_Func3 
  172.    LONGINT fh_Args 
  173. #define fh_Arg1 fh_Args
  174.    LONGINT fh_Arg2 
  175. END STRUCT  /* FileHandle */
  176.  
  177. /* This is the extension to EXEC Messages used by DOS */
  178.  
  179. STRUCT DosPacket  
  180.    MessagePtr  dp_Link   /* EXEC message          */
  181.    MsgPortPtr  dp_Port   /* Reply port for the packet */
  182.                  /* Must be filled in each send. */
  183.    LONGINT dp_Type          /* See ACTION_... below and
  184.                   * 'R' means Read,  'W' means Write to the
  185.                   * file system */
  186.    LONGINT dp_Res1          /* For file system calls this is the result
  187.                   * that would have been returned by the
  188.                   * function,  e.g. Write ('W') returns actual
  189.                   * length written */
  190.    LONGINT dp_Res2          /* For file system calls this is what would
  191.                   * have been returned by IoErr() */
  192. /*  Device packets common equivalents */
  193. #define dp_Action  dp_Type
  194. #define dp_Status  dp_Res1
  195. #define dp_Status2 dp_Res2
  196. #define dp_BufAddr dp_Arg1
  197.    LONGINT dp_Arg1 
  198.    LONGINT dp_Arg2 
  199.    LONGINT dp_Arg3 
  200.    LONGINT dp_Arg4 
  201.    LONGINT dp_Arg5 
  202.    LONGINT dp_Arg6 
  203.    LONGINT dp_Arg7 
  204. END STRUCT  /* DosPacket */
  205.  
  206. /* A Packet does not require the Message to be before it in memory,  but
  207.  * for convenience it is useful to associate the two.
  208.  * Also see the function init_std_pkt for initializing this structure */
  209.  
  210. STRUCT StandardPacket  
  211.    _Message sp_Msg 
  212.    DosPacket sp_Pkt 
  213. END STRUCT  /* StandardPacket */
  214.  
  215. /* Packet types */
  216. #define ACTION_NIL      0
  217. #define ACTION_STARTUP      0
  218. #define ACTION_GET_BLOCK    2   /* OBSOLETE */
  219. #define ACTION_SET_MAP      4
  220. #define ACTION_DIE      5
  221. #define ACTION_EVENT        6
  222. #define ACTION_CURRENT_VOLUME   7
  223. #define ACTION_LOCATE_OBJECT    8
  224. #define ACTION_RENAME_DISK  9
  225. #define ACTION_WRITE       &H57     /*  'W' */
  226. #define ACTION_READ        &H52     /*  'R' */
  227. #define ACTION_FREE_LOCK    15
  228. #define ACTION_DELETE_OBJECT    16
  229. #define ACTION_RENAME_OBJECT    17
  230. #define ACTION_MORE_CACHE   18
  231. #define ACTION_COPY_DIR     19
  232. #define ACTION_WAIT_CHAR    20
  233. #define ACTION_SET_PROTECT  21
  234. #define ACTION_CREATE_DIR   22
  235. #define ACTION_EXAMINE_OBJECT   23
  236. #define ACTION_EXAMINE_NEXT 24
  237. #define ACTION_DISK_INFO    25
  238. #define ACTION_INFO     26
  239. #define ACTION_FLUSH        27
  240. #define ACTION_SET_COMMENT  28
  241. #define ACTION_PARENT       29
  242. #define ACTION_TIMER        30
  243. #define ACTION_INHIBIT      31
  244. #define ACTION_DISK_TYPE    32
  245. #define ACTION_DISK_CHANGE  33
  246. #define ACTION_SET_DATE     34
  247.  
  248. #define ACTION_SCREEN_MODE  994
  249.  
  250. #define ACTION_READ_RETURN  1001
  251. #define ACTION_WRITE_RETURN 1002
  252. #define ACTION_SEEK     1008
  253. #define ACTION_FINDUPDATE   1004
  254. #define ACTION_FINDINPUT    1005
  255. #define ACTION_FINDOUTPUT   1006
  256. #define ACTION_END      1007
  257. #define ACTION_SET_FILE_SIZE    1022    /* fast file system only in 1.3 */
  258. #define ACTION_WRITE_PROTECT    1023    /* fast file system only in 1.3 */
  259.  
  260. /* new 2.0 packets */
  261. #define ACTION_SAME_LOCK    40
  262. #define ACTION_CHANGE_SIGNAL    995
  263. #define ACTION_FORMAT       1020
  264. #define ACTION_MAKE_LINK    1021
  265. /**/
  266. /**/
  267. #define ACTION_READ_LINK    1024
  268. #define ACTION_FH_FROM_LOCK 1026
  269. #define ACTION_IS_FILESYSTEM    1027
  270. #define ACTION_CHANGE_MODE  1028
  271. /**/
  272. #define ACTION_COPY_DIR_FH  1030
  273. #define ACTION_PARENT_FH    1031
  274. #define ACTION_EXAMINE_ALL  1033
  275. #define ACTION_EXAMINE_FH   1034
  276.  
  277. #define ACTION_LOCK_RECORD  2008
  278. #define ACTION_FREE_RECORD  2009
  279.  
  280. #define ACTION_ADD_NOTIFY   4097
  281. #define ACTION_REMOVE_NOTIFY    4098
  282.  
  283. /* Added in V39: */
  284. #define ACTION_EXAMINE_ALL_END  1035
  285. #define ACTION_SET_OWNER    1036
  286.  
  287. /* Tell a file system to serialize the current volume. This is typically
  288.  * done by changing the creation date of the disk. This packet does not take
  289.  * any arguments.  NOTE: be prepared to handle failure of this packet for
  290.  * V37 ROM filesystems.
  291.  */
  292. #define ACTION_SERIALIZE_DISK   4200
  293.  
  294. /*
  295.  * A structure for holding error messages - stored as array with error == 0
  296.  * for the last entry.
  297.  */
  298. STRUCT ErrorString  
  299.     ADDRESS   estr_Nums 
  300.     ADDRESS   estr_Strings 
  301. END STRUCT 
  302.  
  303. /* DOS library node structure.
  304.  * This is the data at positive offsets from the library node.
  305.  * Negative offsets from the node is the jump table to DOS functions
  306.  * node = (STRUCT DosLibrary *) OpenLibrary( "dos.library" .. )      */
  307.  
  308. STRUCT DosLibrary  
  309.     _Library dl_lib 
  310.     RootNodePtr  dl_Root  /* Pointer to RootNode,  described below */
  311.     ADDRESS    dl_GV         /* Pointer to BCPL global vector        */
  312.     LONGINT    dl_A2         /* BCPL standard register values        */
  313.     LONGINT    dl_A5 
  314.     LONGINT    dl_A6 
  315.     ErrorStringPtr  dl_Errors     /* PRIVATE pointer to array of error msgs */
  316.     timerequestPtr  dl_TimeReq    /* PRIVATE pointer to timer request */
  317.     LibraryPtr  dl_UtilityBase    /* PRIVATE ptr to utility library */
  318.     LibraryPtr  dl_IntuitionBase  /* PRIVATE ptr to intuition library */
  319. END STRUCT   /*  DosLibrary */
  320.  
  321. /*                 */
  322.  
  323. STRUCT RootNode  
  324.     ADDRESS    rn_TaskArray         /* [0] is max number of CLI's
  325.                       * [1] is ADDRESS to process id of CLI 1
  326.                       * [n] is ADDRESS to process id of CLI n */
  327.     ADDRESS    rn_ConsoleSegment  /* SegList for the CLI              */
  328.     DateStamp rn_Time  /* Current time                 */
  329.     LONGINT    rn_RestartSeg      /* SegList for the disk validator process   */
  330.     ADDRESS    rn_Info            /* Pointer to the Info structure        */
  331.     ADDRESS    rn_FileHandlerSegment  /* segment for a file handler       */
  332.     MinList rn_CliList  /* new list of all CLI processes */
  333.                    /* the first cpl_Array is also rn_TaskArray */
  334.     MsgPortPtr  rn_BootProc  /* private ptr to msgport of boot fs      */
  335.     ADDRESS    rn_ShellSegment    /* seglist for Shell (for NewShell)     */
  336.     LONGINT    rn_Flags           /* dos flags */
  337. END STRUCT   /* RootNode */
  338.  
  339. #define RNB_WILDSTAR    24
  340. #define RNF_WILDSTAR    (16777216&)
  341. #define RNB_PRIVATE1    1   /* private for dos */
  342. #define RNF_PRIVATE1    2
  343.  
  344. /* ONLY to be allocated by DOS! */
  345. STRUCT CliProcList  
  346.     MinNode cpl_Node 
  347.     LONGINT cpl_First       /* number of first entry in array */
  348.     ADDRESS   cpl_Array 
  349.                  /* [0] is max number of CLI's in this entry (n)
  350.                   * [1] is CPTR to process id of CLI cpl_First
  351.                   * [n] is CPTR to process id of CLI cpl_First+n-1
  352.                   */
  353. END STRUCT 
  354.  
  355. STRUCT DosInfo  
  356.     ADDRESS    di_McName          /* PRIVATE: system resident module list      */
  357. #define di_ResList di_McName
  358.     ADDRESS    di_DevInfo         /* Device List                   */
  359.     ADDRESS    di_Devices         /* Currently zero                */
  360.     ADDRESS    di_Handlers        /* Currently zero                */
  361.     ADDRESS    di_NetHand         /* Network handler processid  currently zero */
  362.     SignalSemaphore di_DevLock     /* do NOT access directly! */
  363.     SignalSemaphore di_EntryLock   /* do NOT access directly! */
  364.     SignalSemaphore di_DeleteLock  /* do NOT access directly! */
  365. END STRUCT   /* DosInfo */
  366.  
  367. /* structure for the Dos resident list.  Do NOT allocate these,  use   */
  368. /* AddSegment(),  and heed the warnings in the autodocs!           */
  369.  
  370. STRUCT Segment  
  371.     ADDRESS seg_Next 
  372.     LONGINT seg_UC 
  373.     ADDRESS seg_Seg 
  374.     STRING seg_Name SIZE 4    /* actually the first 4 chars of ADDRESS name */
  375. END STRUCT 
  376.  
  377. #define CMD_SYSTEM  -1
  378. #define CMD_INTERNAL    -2
  379. #define CMD_DISABLED    -999
  380.  
  381.  
  382. /* DOS Processes started from the CLI via RUN or NEWCLI have this additional
  383.  * set to data associated with them */
  384.  
  385. STRUCT CommandLineInterface  
  386.     LONGINT   cli_Result2         /* Value of IoErr from last command    */
  387.     ADDRESS   cli_SetName         /* Name of current directory       */
  388.     ADDRESS   cli_CommandDir      /* Head of the path locklist       */
  389.     LONGINT   cli_ReturnCode      /* Return code from last command       */
  390.     ADDRESS   cli_CommandName     /* Name of current command         */
  391.     LONGINT   cli_FailLevel       /* Fail level (set by FAILAT)          */
  392.     ADDRESS   cli_Prompt          /* Current prompt (set by PROMPT)      */
  393.     ADDRESS   cli_StandardInput   /* Default (terminal) CLI input        */
  394.     ADDRESS   cli_CurrentInput    /* Current CLI input           */
  395.     ADDRESS   cli_CommandFile     /* Name of EXECUTE command file        */
  396.     LONGINT   cli_Interactive     /* Boolean  True if prompts required   */
  397.     LONGINT   cli_Background      /* Boolean  True if CLI created by RUN     */
  398.     ADDRESS   cli_CurrentOutput   /* Current CLI output              */
  399.     LONGINT   cli_DefaultStack    /* Stack size to be obtained in LONGINT words */
  400.     ADDRESS   cli_StandardOutput  /* Default (terminal) CLI output       */
  401.     ADDRESS   cli_Module          /* SegList of currently loaded command     */
  402. END STRUCT   /* CommandLineInterface */
  403.  
  404. /* This structure can take on different values depending on whether it is
  405.  * a device,  an assigned directory,  or a volume.  Below is the structure
  406.  * reflecting volumes only.  Following that is the structure representing
  407.  * only devices. Following that is the unioned structure representing all
  408.  * the values
  409.  */
  410.  
  411. /* structure representing a volume */
  412.  
  413. STRUCT DeviceList  
  414.     ADDRESS        dl_Next     /* ADDRESS to next device list */
  415.     LONGINT        dl_Type     /* see DLT below */
  416.     MsgPortPtr  dl_Task     /* ptr to handler task */
  417.     ADDRESS        dl_Lock     /* not for volumes */
  418.     DateStamp dl_VolumeDate   /* creation date */
  419.     ADDRESS        dl_LockList     /* outstanding locks */
  420.     LONGINT        dl_DiskType     /* 'DOS',  etc */
  421.     LONGINT        dl_unused 
  422.     ADDRESS        dl_Name     /* ADDRESS to bcpl name */
  423. END STRUCT 
  424.  
  425. /* device structure (same as the DeviceNode structure in filehandler.h) */
  426.  
  427. STRUCT DevInfo  
  428.     ADDRESS  dvi_Next 
  429.     LONGINT  dvi_Type 
  430.     ADDRESS  dvi_Task 
  431.     ADDRESS  dvi_Lock 
  432.     ADDRESS  dvi_Handler 
  433.     LONGINT  dvi_StackSize 
  434.     LONGINT  dvi_Priority 
  435.     LONGINT  dvi_Startup 
  436.     ADDRESS  dvi_SegList 
  437.     ADDRESS  dvi_GlobVec 
  438.     ADDRESS  dvi_Name 
  439. END STRUCT 
  440.  
  441. /* combined structure for devices,  assigned directories,  volumes */
  442.  
  443. STRUCT dol_handler_Struct  
  444.     ADDRESS    dol_Handler 
  445.     LONGINT    dol_StackSize 
  446.     LONGINT    dol_Priority 
  447.     LONGINT   dol_Startup 
  448.     ADDRESS    dol_SegList 
  449.     ADDRESS    dol_GlobVec 
  450. END STRUCT 
  451.  
  452. STRUCT dol_volume_Struct  
  453.     DateStamp dol_VolumeDate 
  454.     ADDRESS     dol_LockList 
  455.     LONGINT     dol_DiskType 
  456. END STRUCT 
  457.  
  458. STRUCT dol_assign_Struct
  459.     ADDRESS   dol_AssignName 
  460.     AssignListPtr  dol_List 
  461. END STRUCT 
  462.  
  463. STRUCT DosList  
  464.     ADDRESS        dol_Next     /* ADDRESS to next device on list */
  465.     LONGINT        dol_Type     /* see DLT below */
  466.     MsgPortPtr  dol_Task     /* ptr to handler task */
  467.     ADDRESS        dol_Lock 
  468.     STRING dol_Misc SIZE 24  
  469.  
  470.     ADDRESS        dol_Name     /* ADDRESS to bcpl name */
  471. END STRUCT 
  472.  
  473. /* structure used for multi-directory assigns. AllocVec()ed. */
  474.  
  475. STRUCT AssignList  
  476.     AssignListPtr  al_Next 
  477.     ADDRESS           al_Lock 
  478. END STRUCT 
  479.  
  480. /* definitions for dl_Type */
  481. #define DLT_DEVICE  0
  482. #define DLT_DIRECTORY   1   /* assign */
  483. #define DLT_VOLUME  2
  484. #define DLT_LATE    3   /* late-binding assign */
  485. #define DLT_NONBINDING  4   /* non-binding assign */
  486. #define DLT_PRIVATE -1  /* for internal use only */
  487.  
  488. /* structure return by GetDeviceProc() */
  489. STRUCT DevProc  
  490.     MsgPortPtr  dvp_Port 
  491.     ADDRESS        dvp_Lock 
  492.     LONGINT       dvp_Flags 
  493.     DosListPtr  dvp_DevNode     /* DON'T TOUCH OR USE! */
  494. END STRUCT 
  495.  
  496. /* definitions for dvp_Flags */
  497. #define DVPB_UNLOCK 0
  498. #define DVPF_UNLOCK (1&)
  499. #define DVPB_ASSIGN 1
  500. #define DVPF_ASSIGN (2&)
  501.  
  502. /* Flags to be passed to LockDosList(),  etc */
  503. #define LDB_DEVICES 2
  504. #define LDF_DEVICES (4&)
  505. #define LDB_VOLUMES 3
  506. #define LDF_VOLUMES (8&)
  507. #define LDB_ASSIGNS 4
  508. #define LDF_ASSIGNS (16&)
  509. #define LDB_ENTRY   5
  510. #define LDF_ENTRY   (32&)
  511. #define LDB_DELETE  6
  512. #define LDF_DELETE  (64&)
  513.  
  514. /* you MUST specify one of LDF_READ or LDF_WRITE */
  515. #define LDB_READ    0
  516. #define LDF_READ    (1&)
  517. #define LDB_WRITE   1
  518. #define LDF_WRITE   (2)
  519.  
  520. /* actually all but LDF_ENTRY (which is used for internal locking) */
  521. #define LDF_ALL     (LDF_DEVICES OR LDF_VOLUMES OR LDF_ASSIGNS)
  522.  
  523. /* a lock structure,  as returned by Lock() or DupLock() */
  524. STRUCT FileLock  
  525.     ADDRESS        fl_Link     /* bcpl pointer to next lock */
  526.     LONGINT        fl_Key      /* disk block number */
  527.     LONGINT        fl_Access   /* exclusive or shared */
  528.     MsgPortPtr  fl_Task     /* handler task's port */
  529.     ADDRESS        fl_Volume   /* ADDRESS to DLT_VOLUME DosList entry */
  530. END STRUCT 
  531.  
  532. /* error report types for ErrorReport() */
  533. #define REPORT_STREAM       0   /* a stream */
  534. #define REPORT_TASK     1   /* a process - unused */
  535. #define REPORT_LOCK     2   /* a lock */
  536. #define REPORT_VOLUME       3   /* a volume node */
  537. #define REPORT_INSERT       4   /* please insert volume */
  538.  
  539. /* Special error codes for ErrorReport() */
  540. #define ABORT_DISK_ERROR    296 /* Read/write error */
  541. #define ABORT_BUSY      288 /* You MUST replace... */
  542.  
  543. /* types for initial packets to shells from run/newcli/execute/system. */
  544. /* For shell-writers only */
  545. #define RUN_EXECUTE     -1
  546. #define RUN_SYSTEM      -2
  547. #define RUN_SYSTEM_ASYNCH   -3
  548.  
  549. /* Types for fib_DirEntryType.  NOTE that both USERDIR and ROOT are  */
  550. /* directories,  and that directory/file checks should use <0 and >=0.    */
  551. /* This is not necessarily exhaustive!  Some handlers may use other  */
  552. /* values as needed,  though <0 and >=0 should remain as supported as     */
  553. /* possible.                                 */
  554. #define ST_ROOT     1
  555. #define ST_USERDIR  2
  556. #define ST_SOFTLINK 3   /* looks like dir,  but may point to a file! */
  557. #define ST_LINKDIR  4   /* hard link to dir */
  558. #define ST_FILE     -3  /* must be negative for FIB! */
  559. #define ST_LINKFILE -4  /* hard link to file */
  560. #define ST_PIPEFILE -5  /* for pipes that support ExamineFH */
  561.  
  562. #endif  /* DOS_DOSEXTENS_H */
  563.